#include <iostream>
#include <map>
#include <string>
#include <utility>

using namespace std;

int main()
{
	map<string, int > wordcnt;
	string word;

	while(cin>>word)
	{
		pair< map<string,int> >::iterator ,bool> ret = wordcnt.insert(make_pair(word,1));
		if(!ret.second)
			++ret.first->second;
	}
	return 0;
}